package com.iflytek.yly.jetpackdemo.databinding;

import android.os.Bundle;

import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.DataBindingUtil;

import com.iflytek.yly.jetpackdemo.BR;
import com.iflytek.yly.jetpackdemo.R;

public class SimpleTextViewDemo4Activity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        ActivityDatabindingDemo4Binding activityDatabindingDemo4Binding =
                DataBindingUtil.setContentView(this,R.layout.activity_databinding_demo4);

        Book book = new Book("JetPack 简明介绍","小王");
        book.rating = 5;
        activityDatabindingDemo4Binding.setVariable(BR.book,book);

    }
}